package com.situ.mymall.service.impl;

import com.situ.mymall.mapper.ShippingMapper;
import com.situ.mymall.pojo.entity.Shipping;
import com.situ.mymall.pojo.query.ShippingQuery;
import com.situ.mymall.service.IShippingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShippingServiceImpl implements IShippingService {

    @Autowired
    private ShippingMapper shippingMapper;

    @Override
    public List<Shipping> list(ShippingQuery shippingQuery) {
        return shippingMapper.list(shippingQuery);
    }

    @Override
    public void add(Shipping shipping) {
        shippingMapper.insertSelective(shipping);
    }

    @Override
    public void updateStatus(Shipping shipping) {
        shippingMapper.updateByPrimaryKeySelective(shipping);
    }

    @Override
    public void deleteByStatusUserId(Shipping shipping) {
        shippingMapper.deleteByStatusUserId(shipping);
    }
}
